<template>
  <div class="feedback-1123">
    <h2 class="title">意见反馈</h2>
    <div class="feedback-box">
      <div class="feedback-row">
        <img
          class="feedback-img"
          src="../../../assets/feedback/feedback-red.jpg"
          alt=""
        />
        <span class="feedback-text"
          >您有什么问题？告诉我们，我们会为你解决的！</span
        >
      </div>
      <div class="feedback-row">
        <img
          class="feedback-img"
          src="../../../assets/feedback/feedback1.jpg"
          alt=""
        />
        <span class="feedback-text">请详细描述您的建议，意见，问题等。</span>
      </div>
      <div class="textarea-row">
        <el-input type="textarea" rows="6" v-model="desc"></el-input>
        <el-button class="sub-btn" type="danger" @click="submitTo">提交意见</el-button>
      </div>
    </div>
  </div>
</template>

<script>
import empty from "@/utils/common";

export default {
  name: "Feedback",
  components: {},
  data() {
    return {
      desc: "",
    };
  },
  methods:{
      submitTo(){
          let data={
              "content": this.desc,
          }
          if(empty(this.desc)){
            this.$message({
              showClose: true,
              message: '提交内容不能为空',
              type: 'warning'
            });
            return false;
          }
          this.$http.post('/sso/addOpinion',data).then(response=> {
              this.$message({
                  showClose: true,
                  message: response.message,
                  type: 'success'
              });
          })
      }
  }
};
</script>

<style lang="scss" scoped>
.feedback-1123 {
  .title {
    font-weight: normal;
    text-align: left;
    height: 28px;
    font-size: 28px;
    line-height: 28px;
    color: #757575;
    padding: 30px 0 0 33px;
  }
  .feedback-box {
    padding: 0 33px;
    text-align: left;

    .feedback-row {
      margin-top: 40px;
      .feedback-img {
        width: 34px;
        height: 42px;
        margin-right: 10px;
      }
      .feedback-text {
        height: 16px;
        font-size: 16px;
        line-height: 37px;
        color: #484848;
      }
    }
    .textarea-row {
      padding: 0 90px 277px 50px;
      .sub-btn {
        margin-top: 20px;
      }
    }
  }
}

/*手机端*/
@media (min-width: 320px) and (max-width: 800px) {
  .content-box {
    .title {
      padding: 10px;
      font-size: 20px;
    }
    .feedback-1123 {
      padding: 20px 0;
    }
    .feedback-box{
      padding: 0 10px;
      text-align: center
    }
    .feedback-row {
      margin-top: 10px !important;
      text-align: left;
      .feedback-text {
        font-size: 14px !important;
      }
    }
    .textarea-row {
      padding: 10px !important;
    }
    .el-button {
      padding: 8px 14px;
      
    }
  }
}
</style>